﻿using System;
using System.Collections.Generic;
using System.Web;

namespace WebMvc.App.Controllers
{
    public class IndexController:NFinal.BaseAction
    {
        public void Index(int a, string b, int c)
        {
            int id = 1;
            string name = "NFinal";
            string newName = "newName";

            LitJson.JsonData data = new LitJson.JsonData();
            data["re"]="a";
            int count = DB.tiaojiu.Delete("delete from user where id=3");
            int counts = DB.tiaojiu.Update("update user set name=@newName where id=1");
            int uid= DB.tiaojiu.Insert("insert into user(name,pwd) values(@name,'123')");
            //调用数据库魔法函数,可在App/Web/Default/IndexController/Index.cs中生成相关的函数
            var users = DB.tiaojiu.QueryAll("select * from tj_cup_type where id>@id");
            var cup = DB.tiaojiu.QueryRow("select * from tj_cup_type where id=@id");
            var name1= DB.tiaojiu.QueryObject("select name from user where id=@id").ToString();

            string text = "欢迎使用NFinal框架.";
            //调用模板
            View("IndexController/Index");
        }
        public void Node()
        {
            string a = "123123";
        }
        
        private void Add()
        {
          
        }
    }
}